﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using System.Xml.Linq;

namespace Ocean.His.MedicalInsurance
{
    /// <summary>
    /// 签到输入
    /// 9001
    /// </summary>
    [DataContract]
    public class SignInModel
    {
        [DataMember(Name = "opter_no")]
        public string OpterNo { get; set; }

        [DataMember(Name = "mac")]
        public string Mac { get; set; }

        [DataMember(Name = "ip")]
        public string Ip { get; set; }
    }

    [DataContract]
    public class SignInRequestModel
    {
        [DataMember(Name = "signIn")]
        public SignInModel SignInModel { get; set; }
    }

    /// <summary>
    /// 9001签到输入
    /// </summary>
    [DataContract]
    public class SI9001RequestModel : SIBaseRequestModel
    {
        /// <summary>
        /// 交易输入
        /// </summary>
        [DataMember(Name = "input")]
        public SignInRequestModel Input { get; set; }

        public SI9001RequestModel(MedicalInsuranceOption medicalInsuranceOption) : base(medicalInsuranceOption)
        {
            Input = new SignInRequestModel();
            Infno = MedicalInsuranceConst.SING_IN_FUNCTION;
            Input.SignInModel = new SignInModel();
        }

        public void SetSignInModel(string ip, string mac, string userId)
        {
            Input.SignInModel.Ip = ip;
            Input.SignInModel.Mac = mac;
            Input.SignInModel.OpterNo = userId;
        }
    }
}
